-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project page now shows "Ask to join project" button for org members #1390
Conversation
Org members who aren't yet project members can ask to join a project by clicking the button, which will send an email to project managers.
One issue that came up when I tested it, but shouldn't arise in production: the elawa project, at the time I tested this, had no members and so there was nobody to send the email to, yet the notification falsely told the user that the project managers had been emailed. However, in production we have a rule that projects without managers aren't allowed, so I think it's safe to ignore that situation. |
if it's an exceptional case then lets throw an exception for that, the UX isn't great but it's better than a false positive I think, and then we don't have to properly handle that case which should never happen. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, just a minor change of throwing an exception from the backend if there's no managers to email
Done in commit 3401e2e, but I'm getting a Typescript error. Although I declared that the AskToJoinProject mutation can throw the new ProjectHasNoManagers exception, that's somehow not getting into the generated GQL types: when I run So this will fail to build (update: yes, it fails), but I'm pushing it anyway because it should be working and I need a bit of help figuring out why the GraphQL type generation is failing. |
…s from the backend
the issue was that |
Okay, so it looks like the only thing remaining is to put an approving review on this and I can get it merged. (I could check the "bypass rules" checkbox, but there's no reason to skip steps in this case). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tweaked the button so we hide the mail icon when it's showing a loading indicator 🤓
Fixes #1153.
Org members who aren't yet project members can ask to join a project by clicking the button, which will send an email to project managers.
Pops up a persistent notification that won't time out: